/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author stumbledog
 */
@Entity
@Table(name = "fantasydraftresult")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Fantasydraftresult.findAll", query = "SELECT f FROM Fantasydraftresult f"),
    @NamedQuery(name = "Fantasydraftresult.findByLeagueId", query = "SELECT f FROM Fantasydraftresult f WHERE f.leagueId = :leagueId"),
    @NamedQuery(name = "Fantasydraftresult.findByLeagueIdteamId", query = "SELECT f FROM Fantasydraftresult f WHERE f.leagueId = :leagueId and f.teamId = :teamId"),
    @NamedQuery(name = "Fantasydraftresult.findById", query = "SELECT f FROM Fantasydraftresult f WHERE f.id = :id"),
    @NamedQuery(name = "Fantasydraftresult.findByRound", query = "SELECT f FROM Fantasydraftresult f WHERE f.round = :round"),
    @NamedQuery(name = "Fantasydraftresult.findByNumberInRound", query = "SELECT f FROM Fantasydraftresult f WHERE f.numberInRound = :numberInRound"),
    @NamedQuery(name = "Fantasydraftresult.findByTotalPickNumber", query = "SELECT f FROM Fantasydraftresult f WHERE f.totalPickNumber = :totalPickNumber"),
    @NamedQuery(name = "Fantasydraftresult.findByFantasyPositionInRoster", query = "SELECT f FROM Fantasydraftresult f WHERE f.fantasyPositionInRoster = :fantasyPositionInRoster")})
public class Fantasydraftresult implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Column(name = "round")
    private Integer round;
    @Column(name = "numberInRound")
    private Integer numberInRound;
    @Column(name = "totalPickNumber")
    private Integer totalPickNumber;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 5)
    @Column(name = "fantasyPositionInRoster")
    private String fantasyPositionInRoster;
    @JoinColumn(name = "teamId", referencedColumnName = "id")
    @ManyToOne(optional = false)
    private Fantasyteam teamId;
    @JoinColumn(name = "playerId", referencedColumnName = "id")
    @ManyToOne(optional = false)
    private Nflplayer playerId;
    @JoinColumn(name = "leagueId", referencedColumnName = "id")
    @ManyToOne(optional = false)
    private Fantasyleague leagueId;

    public Fantasydraftresult() {
    }

    public Fantasydraftresult(Integer id) {
        this.id = id;
    }

    public Fantasydraftresult(Integer id, String fantasyPositionInRoster) {
        this.id = id;
        this.fantasyPositionInRoster = fantasyPositionInRoster;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getRound() {
        return round;
    }

    public void setRound(Integer round) {
        this.round = round;
    }

    public Integer getNumberInRound() {
        return numberInRound;
    }

    public void setNumberInRound(Integer numberInRound) {
        this.numberInRound = numberInRound;
    }

    public Integer getTotalPickNumber() {
        return totalPickNumber;
    }

    public void setTotalPickNumber(Integer totalPickNumber) {
        this.totalPickNumber = totalPickNumber;
    }

    public String getFantasyPositionInRoster() {
        return fantasyPositionInRoster;
    }

    public void setFantasyPositionInRoster(String fantasyPositionInRoster) {
        this.fantasyPositionInRoster = fantasyPositionInRoster;
    }

    public Fantasyteam getTeamId() {
        return teamId;
    }

    public void setTeamId(Fantasyteam teamId) {
        this.teamId = teamId;
    }

    public Nflplayer getPlayerId() {
        return playerId;
    }

    public void setPlayerId(Nflplayer playerId) {
        this.playerId = playerId;
    }

    public Fantasyleague getLeagueId() {
        return leagueId;
    }

    public void setLeagueId(Fantasyleague leagueId) {
        this.leagueId = leagueId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Fantasydraftresult)) {
            return false;
        }
        Fantasydraftresult other = (Fantasydraftresult) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entities.Fantasydraftresult[ id=" + id + " ]";
    }
    
}
